function mxRhombus(bounds, fill, stroke, strokewidth)
{
	this.bounds = bounds;
	this.fill = fill;
	this.stroke = stroke;
	this.strokewidth = strokewidth || 1;
};
mxRhombus.prototype = new mxShape();
mxRhombus.prototype.constructor = mxRhombus;
mxRhombus.prototype.mixedModeHtml = false;
mxRhombus.prototype.preferModeHtml = false;
mxRhombus.prototype.createHtml = function()
{
	var node = null;

	if (mxClient.IS_CANVAS)
	{
		node = document.createElement('CANVAS');
		this.configureHtmlShape(node);
		node.style.borderStyle = 'none';
	}
	else
	{
		node = document.createElement('DIV');
		this.configureHtmlShape(node);
	}
	return node;
};
mxRhombus.prototype.createVml = function()
{
	var node = document.createElement('v:shape');
	this.configureVmlShape(node);
	return node;
};
mxRhombus.prototype.createSvg = function()
{
	return this.createSvgGroup('path');
}

mxRhombus.prototype.redrawVml = function()
{
	this.node.setAttribute('strokeweight', this.strokewidth * this.scale);
	this.updateVmlShape(this.node);
	var x = 0;
	var y = 0;
	var w = Math.floor(this.bounds.width);
	var h = Math.floor(this.bounds.height);
	this.node.setAttribute('coordsize', w + ',' + h);
	var points = 'm ' + Math.floor(x + w / 2) + ' ' + y + ' l ' + (x + w) + ' ' + Math.floor(y + h / 2) + ' l '
		+ Math.floor(x + w / 2) + ' ' + (y + h) + ' l ' + x + ' ' + Math.floor(y + h / 2);
	this.node.setAttribute('path', points + ' x e');
};
mxRhombus.prototype.redrawHtml = function()
{
	if (this.node.nodeName == 'CANVAS')
	{
		this.redrawCanvas();
	}
	else
	{
		this.updateHtmlShape(this.node);
	}
};
mxRhombus.prototype.redrawCanvas = function()
{
	this.updateHtmlShape(this.node);
	var x = 0;
	var y = 0;
	var w = this.bounds.width;
	var h = this.bounds.height;
	this.node.setAttribute('width', w);
	this.node.setAttribute('height', h);

	if (!this.isRepaintNeeded)
	{
		var ctx = this.node.getContext('2d');
		ctx.clearRect(0, 0, w, h);
		ctx.beginPath();
		ctx.moveTo(x + w / 2, y);
		ctx.lineTo(x + w, y + h / 2);
		ctx.lineTo(x + w / 2, y + h);
		ctx.lineTo(x, y + h / 2);
		ctx.lineTo(x + w / 2, y);

		if (this.node.style.backgroundColor != 'transparent')
		{
			ctx.fillStyle = this.node.style.backgroundColor;
			ctx.fill();
		}

		if (this.node.style.borderColor != null)
		{
			ctx.strokeStyle = this.node.style.borderColor;
			ctx.stroke();
		}
		this.isRepaintNeeded = false;
	}
};
mxRhombus.prototype.redrawSvg = function()
{
	this.updateSvgNode(this.innerNode);

	if (this.shadowNode != null)
	{
		this.updateSvgNode(this.shadowNode);
	}
};
mxRhombus.prototype.updateSvgNode = function(node)
{
	var strokeWidth = Math.max(1, this.strokewidth * this.scale);
	node.setAttribute('stroke-width', strokeWidth);
	var x = this.bounds.x;
	var y = this.bounds.y;
	var w = this.bounds.width;
	var h = this.bounds.height;
	var d =
		'M ' + (x + w / 2) + ' ' + y + ' L ' + (x + w) + ' ' + (y + h / 2) + ' L ' + (x + w / 2) + ' ' + (y + h) + ' L '
		+ x + ' ' + (y + h / 2) + ' Z ';
	node.setAttribute('d', d);
	this.updateSvgTransform(node, node == this.shadowNode);
};